<style>
	.iconEWM{
		position: fixed;
		z-index: 2000;
		top: 45%;
		right: 0;
		background: rgba(0,0,0,0.75);
		border-bottom-left-radius: 5px;
		border-top-left-radius: 5px;
		padding: 3px 3px 3px 8px;
	}
	.iconEWM>img {
		max-width: 30px;
	}
	.erweima,.erweimaa{
		display: none;
		width: 100%;
		position: fixed;
		top: 0;
		z-index: 10096;
		height: 100%;
		background: rgba(0,0,0,0.75);
		left: 0;
	}
	.erweima>img,.erweimaa>img{
		width: 80%;
		margin-top: 30%;
		margin-left: 10%;
	}
	.erweima>div,.erweimaa>div{
		text-align: center;
		margin: 10px;
		color: #fff;
	}

</style>
<script type="text/javascript">

	wx.ready(function () {
		var shareData = {
			title: "{$config['share']['share_title']}",
			desc: "{$config['share']['share_desc']}",
			link: "{$tourl}",
			imgUrl: "{php echo tomedia($config['share']['share_image'])}"
		};
	//分享朋友
		wx.onMenuShareAppMessage({
		    title: shareData.title,
		  	desc: shareData.desc,
		  	link: shareData.link,
		  	imgUrl:shareData.imgUrl,
		  	trigger: function (res) {
				//alert(shareData.desc);
		  	},
		  	success: function (res) {
				//alert(shareData.desc);
		  	},
		  	cancel: function (res) {
				//alert(shareData.desc);
		  	},
		  	fail: function (res) {
		    	//alert(JSON.stringify(res));
		  	}
		});
//		wx.getLocation({
//			type: 'gcj02', //返回可以用于wx.openLocation的经纬度
//			success: function(res) {
//				var latitude = res.latitude
//				var longitude = res.longitude
//				wx.openLocation({
//					latitude: latitude,
//					longitude: longitude,
//					scale: 28
//				})
//			}
//		})
	//朋友圈
		wx.onMenuShareTimeline({
		  	title: shareData.title,
		  	link: shareData.link,
		  	imgUrl:shareData.imgUrl,
		  	trigger: function (res) {
		  	},
		  	success: function (res) {
		  	},
		  	cancel: function (res) {
		  	},
		  	fail: function (res) {
		    	alert(JSON.stringify(res));
		  	}
		});
		var shareAddress = {php echo json_encode($shareAddress)};
		WeixinJSBridge.invoke('editAddress',shareAddress,function(res){
		    if(res.err_msg=='edit_address:ok'){
		        $("#myname").val(res.userName);
		        $('#myphone').val(res.telNumber);
		        $('#detailed_address').val(res.addressDetailInfo);
		        var city = res.proviceFirstStageName+" "+res.addressCitySecondStageName+" "+res.addressCountiesThirdStageName;
		        $('#city-picker').val(city);
		    }
		});
	});

</script>

<!--定义关注弹出层微信二维码-->
{if $_W['fans']['follow'] !=1 &&  $config['tginfo']['guanzhu']==1 && $action != 'addmanage' && $action != 'createadd' && $action != 'cash'&& $action != 'orderconfirm'}
    <div class="subscribe">
        <div class="img"><img src="{php echo tomedia($config['tginfo']['slogo'])}"></div>
        <div class="text">
            <p>欢迎进入<font>{$config['tginfo']['sname']}</font></p>
            <p>关注公众号,享专属服务</p>
        </div>
        <div class="btn">
        <div class="buttonn" onclick="followButton()">立即关注</div>
        </div>
    </div>
	{/if}
{if !empty($config['tginfo']['kefu_image'])}
<div class="fixRT">
	<div class="iconEWM"><img src="../../../../../../addons/lexiangpingou/app/resource/images/EWM.png" alt=""/></div>
	<div class="erweima">
		<img src="{php echo tomedia($config['tginfo']['kefu_image'])}" alt=""/>
		<div>长按识别二维码</div>
	</div>
</div>
{/if}
<div class="erweimaa">
	<img src="{php echo tomedia($config['tginfo']['followed_image'])}" alt=""/>
	<div>长按识别二维码</div>
</div>
<!--	
<div id="footWx">
<a href="javascript:closeFollowButton();" id="closefootWx">ㄨ</a>
<img src="{php echo tomedia($config['tginfo']['followed_image'])}">
<a href="{php echo app_url('goods/list')}" id="gohomelink">返回首页>></a>
</div><!--定义关注弹出层微信二维码 end-->
{if $_W['fans']['follow'] !=1 &&$subscribe==1}
<script type="text/javascript">
//followButton();
//document.getElementById("closefootWx").style.display="none";
</script>
{/if}
<script language='javascript'>
	$(".iconEWM>img").on('click',function(){
		$(".erweima").css('display','block');
	});
	$(".erweima,.erweimaa").on('click',function(){
		$(this).css('display','none');
	});
	function followButton(){
		$(".erweimaa").css('display','block');
	}
	/*$(function(){
		$.ajax({
			url: '{php echo app_url("home/autorefund")}',
			cache:false
		});
	})*/

	



</script>
</body>
</html>